<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
	"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="Content-Language" content="en" />
	<meta name="GENERATOR" content="PHPEclipse 1.2.0" />
	<link href="../css/layout.css" rel="stylesheet" type="text/css">
	<title>Zeiterfassung - Abfrage</title>
</head>
<body>


<?php

include("template.php");

//echo $_SESSION['IsLoggedIn'];


$query = "SELECT p.name, pr.name, az.von, az.bis FROM Arbeitet a INNER JOIN Personal p ON a.fk_personal=p.pk_persnr
		INNER JOIN Projekt pr ON a.fk_projekt = pr.pk_nr INNER JOIN Arbeitszeit az ON a.fk_arbeitszeit = az.pk_id";

$result=$db->query($query); 

echo "<table><tr><td>PersName</td><td>ProjName</td><td>Von</td><td>Bis</td></tr>";
	foreach($result as $entry) {
		echo '<tr><td>' . $entry['p.name'] . '</td><td> ' . $entry['pr.name'] . ' </td><td>' . $entry['az.von'] . '</td><td>' . $entry['az.bis'] . '</td></tr>';
	}
	echo "</table>";


?>
<br />
<a href="zeiterfassung_choicewahl.php">Zurueck</a>		

</body>
</html>

